﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using BookClub.Web.DataModel;

namespace BookClub.Controls {

    public partial class BookEditor : UserControl {

        public static readonly DependencyProperty BookProperty =
            DependencyProperty.Register("Book", typeof(Book), typeof(BookEditor), null);

        public static readonly DependencyProperty CategoriesProperty =
            DependencyProperty.Register("Categories", typeof(IEnumerable<Category>), typeof(BookEditor), null);

        public BookEditor() {
            InitializeComponent();
        }

        public Book Book {
            get {
                return (Book)GetValue(BookProperty);
            }
            set {
                SetValue(BookProperty, value);
            }
        }

        public IEnumerable<Category> Categories {
            get {
                return (IEnumerable<Category>)GetValue(CategoriesProperty);
            }
            set {
                SetValue(CategoriesProperty, value);
            }
        }
    }
}
